WeChatApp
.directive('sessionNav', function () {
    return {
        restrict:'E',
        transclude:true,
        replace:true,
        templateUrl:'views/sessionNav.template.html'
    };
})
.directive('wxTabClick', function () {
    //<ul>
    //<li wx-tab-click="className"></li>
    //<li wx-tab-click="className"></li>
    //</ul>
    // 点击li元素时，该元素将赋予className类，并移除其它兄弟元素的className类
    return {
        link: function (scope, element, attr) {
            var className = attr.wxTabClick;
            element.bind('click', function () {
                element.parent().children().removeClass(className);
                element.addClass(className);
            });
        }
    };
})